package cn.wolfcode.service;

import cn.wolfcode.domain.SystemDictionaryItem;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface ISystemDictionaryItemService {
    /**
     * 字典目录增加
     * @param record 字典目录对象
     * @return
     */
    int insertSystemDictionaryItem(SystemDictionaryItem record);

    /**
     * 删除单个字典目录
     * @param id
     * @return
     */
    int deleteSystemDictionaryItem(Long id);

    /*
    * 更新字典目录明细
    * */
    int updateSystemDictionaryItem(SystemDictionaryItem record);

    /**
     * 查询单个字典目录明细
     * @param id
     * @return
     */
    SystemDictionaryItem selectSystemDictionaryItem(Long id);

    /*
    * 查询所有字典目录明细
    * */
    List<SystemDictionaryItem> selectSystemDictionaryItemList();

    /*
    * 分页查询
    * */
    PageInfo<SystemDictionaryItem> query(QueryObject qo);

    /**
     * 通过字典目录的id来获取对应的明细
     * @param id
     * @return
     */
    List<SystemDictionaryItem> selectByTypeId(Long id);


    /**
     * 通过字典目录的sn来获取对应的title
     * @param sn
     * @return
     */
    List<SystemDictionaryItem> selectByTypeSn(String sn);

    List<SystemDictionaryItem> selectByParentId(Long id);
}
